//
//  TrainTableViewCell.m
//  EagleEye
//
//  Created by 18_李明明 on 15-1-26.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "TrainTableViewCell.h"

@implementation TrainTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.station = [[UILabel alloc] init];
        self.time = [[UILabel alloc] init];
        self.during = [[UILabel alloc] init];
        [self.contentView addSubview:self.station];
        [self.contentView addSubview:self.time];
        [self.contentView addSubview:self.during];
        self.during.textAlignment = UITextAlignmentCenter;
    }
    return self;
}
-(void)layoutSubviews
{
    CGFloat width = self.contentView.frame.size.width;
    CGFloat height = self.contentView.frame.size.height;
    self.station.frame = CGRectMake(10, 0, width / 3, height);
    self.time.frame = CGRectMake(10 + width / 3, 0, width / 3, height);
    self.during.frame = CGRectMake(10 + width * 2 / 3, 0, width / 3 - 10, height);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
